package com.white.algebra.service;



import com.white.algebra.domain.Permission;
import com.white.algebra.domain.Role;

import javax.swing.*;
import java.sql.SQLException;
import java.util.List;

public interface RoleService {
    List<Role> findAll() throws SQLException;

    void save(Role role) throws SQLException;

    List<Role> findById(String id) throws SQLException;

    void deleteById(String roleId) throws SQLException;


    List<Permission> findUserByIdAndAllRole(String id) throws SQLException;

    void addpermission(String permissionId, String roleId) throws SQLException;

    void deleteRole_PermissionById(String roleId) throws SQLException;

    void deleteUserAndRoleById(String roleId) throws SQLException;

    void deletePermissionById(String permissionId, String roleId) throws SQLException;

    List<Role> findRoleByPermissionId(String id) throws SQLException;

    List<Permission> findPermissionByRoleId(String id) throws SQLException;
}
